package repository

import (
	"hcy-api/structs/tables"
	"idp/global"
)

var WinWarnRepository = new(winWarnRepository)

type winWarnRepository struct {
}

// SaveLoadWarn 保存cpu和内存负载警告信息
func (r winWarnRepository) SaveLoadWarn(m tables.IdpWarnLoad) (err error) {
	return global.DB.Create(&m).Error
}

// SaveHostnameChange 保存windows登录名变化记录
func (r winWarnRepository) SaveHostnameChange(m tables.IdpWarnHostname) (err error) {
	return global.DB.Create(&m).Error
}
